<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions" -->
    <xsl:output method="html" indent="no"/>
    <xsl:template match="/">
        <html>
            <head>
                <link href='http://fonts.googleapis.com/css?family=Emblema+One' rel='stylesheet' type='text/css'/>
                <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                <style>
      body {
        font-family: 'Emblema One', cursive;
        font-size: 48px;
      }
    </style>
            </head>
            <body>
                <h2>The Sims Social 材料總表</h2>
                <table>
                    <xsl:for-each select="database/group[1]/collectibleitem">
                        <xsl:sort select="@id"/>
                        <xsl:variable name="itemId" select="@id" />
                    <xsl:if test="not(contains(@name,'removed')) and not(contains(@name,'Removed'))">
                        <tr>
                            <td>
                                <xsl:value-of select="@id"/>
                            </td>
                            <td>
                                <xsl:value-of select="@name"/>
                            </td>

                            <td>
                                <xsl:variable name="myVar1" select="concat('http://static-cdn.playfish.com/game/simssoc/s/gifts/item/item_', @id)" />
                                <xsl:variable name="myVar2" select="concat( $myVar1,'.png')" />
                                <xsl:element name="img">
                                    <xsl:attribute name="src">
                                        <xsl:value-of select="$myVar2"/>
                                    </xsl:attribute>
                                    <xsl:attribute name="height">
                                        <xsl:value-of select="36"/>
                                    </xsl:attribute>
                                </xsl:element>
                            </td>
                            <td>
                                <xsl:variable name="myVar3" select="concat('http://static-cdn.playfish.com/game/simssoc/s/feed/collectibles/ask_for_collectible_', @id)" />
                                <xsl:variable name="myVar4" select="concat( $myVar3,'.png')" />
                                <xsl:element name="img">
                                    <xsl:attribute name="src">
                                        <xsl:value-of select="$myVar4"/>
                                    </xsl:attribute>
                                    <xsl:attribute name="height">
                                        <xsl:value-of select="36"/>
                                    </xsl:attribute>
                                </xsl:element>
                            </td>


                        </tr>
                                        </xsl:if>
</xsl:for-each>
                </table>
            </body>
        </html>
    </xsl:template>
</xsl:stylesheet>


